home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
boe.pres.k12.wv.us
/
boe.pres.k12.wv.us.zip
/
boe.pres.k12.wv.us
/
Utilities
/
Xerox Workcentre 5335
/
Windows Scan
/
64-bit_x64
/
Russian
/
cpsimage.cab
/
data
/
sys
/
transform2d.elf
< prev
next >
Wrap
Text File
|
2009-04-23
|
5KB
|
130 lines
/*****************************************************************************/
/*
** Module: TRANSFORM2D
*/
/*****************************************************************************/
/*****************************************************************************/
/*
** This class represents a rectangular window.
*/
/*****************************************************************************/
private
CLASS WINDOW {
DOUBLE x;
DOUBLE y;
DOUBLE width;
DOUBLE height;
}
/*****************************************************************************/
/*
** This class represents a 3 x 3 affine transformation matrix decomposition.
**
** The matrix decomposition of any non-degenerate 3 x 3 affine transformation
** matrix can be expressed as the following sequence of transformations
**
** S(sx, sy) * SH(shx, 0) * R(ang) * T(tx, ty)
*/
/*****************************************************************************/
private
CLASS TRANSFORM2DPARTS {
DOUBLE tx;
DOUBLE ty;
DOUBLE sx;
DOUBLE sy;
DOUBLE shx;
DOUBLE angle;
}
/*****************************************************************************/
/* @New
// DESCRIPTION
This class represents a 3 x 3 affine transformation matrix.
A general transformation matrix is expressed as
[ a b 0 ]
[ c d 0 ]
[ e f 1 ]
The concatenation of two transforms in matrix form is:
[ a1 b1 0 ] [ a2 b2 0 ] [ a1*a2+b1*c2 a1*b2+b1*d2 0 ]
[ c1 d1 0 ] X [ c2 d2 0 ] = [ c1*a2+d1*c2 c1*b2+d1*d2 0 ]
[ e1 f1 1 ] [ e2 f2 1 ] [ e1*a2+f1*c2+e2 e1*b2+f1*d2+f2 1 ]
It is primarily used in support of the Affine script procedure.
*/
/* @applyToWin Applies this transform to input window. */
/* @concatenate Concatenates the input transform to this transform. */
/* @decompose Decomposes non-degenerate transform into standard operations. */
/* @determinant Returns the determinant of this transform. */
/* @getCoeffs Gets coefficients of this transform. */
/* @identity Sets this transform to the identity. */
/* @invert Sets this transform to its inverse. */
/* @isIdentity Tests if this transform is the identity. */
/* @parse Parses a transform from a string representation. */
/* @preconcatenate Concatenates this transform to the input transform. */
/* @rotate Concatenates a rotation transform onto this transform. */
/* @scale Concatenates a scale transform onto this transform. */
/* @set Sets this transform to the input transform. */
/* @setCoeffs Sets coefficients of this transform. */
/* @shear Concatenates a shear transform onto this transform. */
/* @toString Returns a string representation of this transform. */
/* @translate Concatenates a translation transform onto this transform. */
/*****************************************************************************/
private
CLASS TRANSFORM2D {
// Methods
METHOD New () RETURNS (TRANSFORM2D t) NATIVE "Transform2DMethods@xipsup";
METHOD Free () NATIVE "Transform2DMethods@xipsup";
METHOD set (TRANSFORM2D other) NATIVE "Transform2DMethods@xipsup";
METHOD identity () NATIVE "Transform2DMethods@xipsup";
METHOD translate (DOUBLE tx, DOUBLE ty) NATIVE "Transform2DMethods@xipsup";
METHOD scale (DOUBLE sx, DOUBLE sy) NATIVE "Transform2DMethods@xipsup";
METHOD rotate (DOUBLE angle, DOUBLE fx, DOUBLE fy)
NATIVE "Transform2DMethods@xipsup";
METHOD shear (DOUBLE shx, DOUBLE shy) NATIVE "Transform2DMethods@xipsup";
METHOD invert () RETURNS (BOOLEAN success)
NATIVE "Transform2DMethods@xipsup";
METHOD preconcatenate (TRANSFORM2D other)
NATIVE "Transform2DMethods@xipsup";
METHOD concatenate (TRANSFORM2D other)
NATIVE "Transform2DMethods@xipsup";
METHOD decompose () RETURNS (TRANSFORM2DPARTS parts)
NATIVE "Transform2DMethods@xipsup";
METHOD determinant () RETURNS (DOUBLE value)
NATIVE "Transform2DMethods@xipsup";
METHOD isIdentity () RETURNS (BOOLEAN value)
NATIVE "Transform2DMethods@xipsup";
METHOD applyToWin (LIST window) RETURNS (LIST rwindow)
NATIVE "Transform2DMethods@xipsup";
METHOD parse (STRING str) RETURNS (TRANSFORM2D t)
NATIVE "Transform2DMethods@xipsup";
METHOD toString () RETURNS (STRING value)
NATIVE "Transform2DMethods@xipsup";
METHOD getCoeffs () RETURNS (LIST coeffs)
NATIVE "Transform2DMethods@xipsup";
METHOD setCoeffs (LIST coeffs)
NATIVE "Transform2DMethods@xipsup";
}